package com.jackson0714.passjava.member.feign.fallback;

import com.jackson0714.common.utils.R;
import com.jackson0714.passjava.member.feign.StudyTimeFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
  * @Description:降级处理类   hystrix服务降级处理，防止因超时、异常等导致的服务调用雪崩
  * @Version v1.0.0
  * @author zhangpeng148
  * @date 2022/1/19 17:09
  */
@Service
@Slf4j
public class StudyTimeFeignFallbackService implements StudyTimeFeignService {

    @Override
    public R getMemberStudyTimeListTest(Long id) {
        log.error("降级逻辑，服务暂时不可用！");
        return R.error(999,"服务暂时不可用请等待！");
    }
}
